package com.mtsmda.designPattern.singleton;

public class ThreadSafeDoubleCheckedLockingSingleton {

	private static ThreadSafeDoubleCheckedLockingSingleton instance;

	private ThreadSafeDoubleCheckedLockingSingleton() {

	}

	public static ThreadSafeDoubleCheckedLockingSingleton getInstance() {
		if (instance == null) {
			synchronized (ThreadSafeDoubleCheckedLockingSingleton.class) {
				if (instance == null) {
					instance = new ThreadSafeDoubleCheckedLockingSingleton();
				}
			}
		}
		return instance;
	}

}